//
//  AiCustomBean.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/10/31.
//

import Foundation
import GRDB
//自定义api
class AiCustomBean : IDbTable,Identifiable ,Codable {
    static let databaseTableName = "aiCustom"
    
    //db排除字段
    func doCustomDBExcluded()  -> [String? : Any?] {
        return doExcluded(subject: self, excluded: [""])
    }
    
    var objectId: String? = nil
    var name: String? = nil
    var host: String? = nil
    var token: String? = nil
    var model: String? = nil
    var active: Bool? = nil
    var temperature: TimeInterval? = nil
    var url: String? = nil
    var top_p: TimeInterval? = nil
    var sort: Int? = nil
}

extension AiCustomBean {
    // db数据库指定字段
    public func encode(to container: inout PersistenceContainer) {
        doDBExcluded(to: &container)
    }
}
